<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员登录</title>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/login.css">
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/common/jquery-ui-1.10.4.custom.css">
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-1.10.2.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/common/jquery-ui-1.10.4.custom.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() %>/resources/js/login.js"></script>
</head>
<body>
	<p class="toindex">
		<a href="<%=request.getContextPath() %>/index">首页&nbsp;>></a>&nbsp;登录
	</p>
	<div class="center">
		<img
			src="<%=request.getContextPath() %>/resources/login_img/login_pic.jpg">
		<form action="<%=request.getContextPath() %>/login" method="post" class="login_form">

			<%	
  			Object succ= request.getAttribute("succ");
  			Object erro= request.getAttribute("erro");
  			if(succ!=null){	
  		 %>
			<div class="succ">
				登陆成功<span id="suc"></span>
			</div>
			<script type="text/javascript">
  		 			
  		 			var sp=document.getElementById('suc');
  		 			var i=5;
  		 			sp.innerHTML=i+"秒后跳转到首页";
  		 			setInterval(function() {
  		 				i--;
  		 				sp.innerHTML=i+"秒后跳转到首页";
  		 				if(i==0){
  		 					location.href="/index";
  		 				}
  		 			}, 1000)
  		 		
  		 		</script>
			<%
  		 	}
  		 	if(erro!=null){
  		  %>
			<div class="erro">用户名或密码错误</div>
			<% 
  		  	}
  		  %>
			用户名:<input type="text" name="username" placeholder="请输入用户名">
			<br> 密&nbsp;码：<input type="password" name="password"
				placeholder="请输入密码"> <a href="javascript:void()" id="forget">&nbsp;忘记密码？</a>
			<br><!--  &nbsp;&nbsp;&nbsp;<input type="checkbox" name="checkbox">2周内记住密码 -->
			<br> <input class="login_btn" type="submit" value="登录"
				name="login_btn"> <a href="<%=request.getContextPath() %>/ToRegister"><input
				class="register_btn" type="button" value="注册" name="register_btn"></a>
		</form>
	</div>
	<div id="forgetinfor" style="display: none; text-align: center;">
		<strong id="tip"></strong>
		<h2 class='uname'>
			用户名:&nbsp;&nbsp;<input type="text" name="uname">	
			<br><br><button class="btn" onclick="getQuestion()">下一步</button>
		</h2>
		<h2 style="display: none;" class="ques_answ">
			密保问题:&nbsp;&nbsp;<span id='question'></span>
		<br>
		<br>
			答案:&nbsp;&nbsp;<input type="text" name="answer">
			<br><br><button class="btn" onclick="checkAnswer()">下一步</button>
		</h2>
		<h2 style="display: none;" class="newpassword">
			新密码:&nbsp;<input type="text" name="newpassword">
			<br><br><button class="btn" onclick="updatePass()">提交</button>
		</h2>
	</div>
	<div class="foot">
		<a href="###">服务说明丨</a><a href="###">关于财浙丨</a><a href="###">诚聘英才丨</a><a
			href="###">代理合作丨</a><a href="###">广告业务丨</a><a href="###">联系我们丨</a><a
			href="###">我要提建议</a> <br> <span>Copyright © SCZY 财浙旅行社</span>
	</div>
</body>
</html>